using System;
using System.Linq;
using System.Collections.Generic;
using Granite.Collections;

namespace Toon.Models.Catalogs
{
	/// <summary>
	/// This represents the skills and shitcks from the default setting
	/// </summary>
	public class StandardCatalog : Catalog
	{
		public StandardCatalog()
		{
			var attributes = new List<Toon.Models.Catalogs.AttributeDefinition>();
			attributes.Add(new Toon.Models.Catalogs.AttributeDefinition("Muscle", new string[] { "Break Down Door", "Climb", "Fight", "Pick Up Heavy Thing", "Throw" }));
			attributes.Add(new Toon.Models.Catalogs.AttributeDefinition("Zip", new string[] { "Dodge", "Drive Vehicle", "Fire Gun", "Jump", "Ride", "Run", "Swim" }));
			attributes.Add(new Toon.Models.Catalogs.AttributeDefinition("Smarts", new string[] { "Hide/Spot Hidden", "Identify Dangerous Thing", "Read", "Resist Fast Talk", "See/Hear/Smell", "Set/Disarm Trap", "Track/Cover Tracks" }));
			attributes.Add(new Toon.Models.Catalogs.AttributeDefinition("Chutzpah", new string[] { "Fast-Talk", "Pass/Detect Shoddy Goods", "Slieight of Hand", "Sneak" }));

			m_Attributes = new AttributeDefinitionCollection(attributes);


			var shitcks = new List<ShitckDefinition>();
			shitcks.Add(new ShitckDefinition("Bag of Many Things", 5, "Deluxe Toon p.38"));
			shitcks.Add(new ShitckDefinition("Change Shape", 5, "Deluxe Toon p.38"));
			shitcks.Add(new ShitckDefinition("Coat of Arms", 4, "Deluxe Toon p.39"));
			shitcks.Add(new ShitckDefinition("Cosmic Shift", 10, "Deluxe Toon p.40"));
			shitcks.Add(new ShitckDefinition("Detect Item", 2, "Deluxe Toon p.41"));
			shitcks.Add(new ShitckDefinition("Flying", 4, "Deluxe Toon p.41"));
			shitcks.Add(new ShitckDefinition("Hypnosis", 5, "Deluxe Toon p.41"));
			shitcks.Add(new ShitckDefinition("Incredible Luck", 3, "Deluxe Toon p.42"));
			shitcks.Add(new ShitckDefinition("Incredible Speed", 6, "Deluxe Toon p.42"));
			shitcks.Add(new ShitckDefinition("Incredible Strength", 5, "Deluxe Toon p.43"));
			shitcks.Add(new ShitckDefinition("Invisibility", 5, "Deluxe Toon p.43"));
			shitcks.Add(new ShitckDefinition("Pet or Sidekick", 3, "Deluxe Toon p.44"));
			shitcks.Add(new ShitckDefinition("Quick Change/Disguise", 3, "Deluxe Toon p.45"));
			shitcks.Add(new ShitckDefinition("Stretching", 3, "Deluxe Toon p.45"));
			shitcks.Add(new ShitckDefinition("Teleport", 6, "Deluxe Toon p.46"));

			m_Shitcks = new ShitckDefinitionCollection(shitcks);


			var species = new TableCollectionBuilder<string>();

			species["Species"].Add("Human", 7);
			species["Species"].AddRange("Ant", "Robot Ant", "Flea", "Little Green Man from Mars", "Robot", "Rabbit", "Mouse", "Rat", "Cat", "Dog", "Coyote", "Wolf");
			species["Species"].AddRange("Fox", "Gorilla", "Horse", "Pig", "Cow", "Chicken", "Rooster", "Duck", "Parakeet", "Chicken Hawk", "Canary", "Owl", "Tasmanian Devil", "Bear", "Kangaroo", "Sea Serpent", "Other");

			species["Silly Species"].AddRange("Frog", "Crow", "Stork", "Dinosaur", "Elephant", "Hippo", "Mynah Bird", "Squirrel", "Panda", "Penguin", "Giant Penguin", "Giant Were-Penguin", "Roadrunner", "Tortoise", "Walrus", "Deer", "Alligator", "Panther");
			species["Silly Species"].AddRange("Grasshopper", "Werewolf", "Ghost", "Vampire", "Monkey", "Bull", "Foogle Bird", "Elf", "Gremlin", "Dwarf", "Hobbit", "Orc", "Lizard", "Unicorn", "Fish", "Shark", "Whale", "Octopus");

			m_Species = species.ToTableCollection();

			var naturalEnemies = new TableCollectionBuilder<string>();

			naturalEnemies["Species"].Add("Humans", 7);
			naturalEnemies["Species"].AddRange("Ants", "Robot Ants", "Fleas", "Little Green Men from Mars", "Robots", "Rabbits", "Mice", "Rats", "Cats", "Dogs", "Coyotes", "Wolves");
			naturalEnemies["Species"].AddRange("Foxes", "Gorillas", "Horses", "Pigs", "Cows", "Chickens", "Roosters", "Ducks", "Parakeets", "Chicken Hawks", "Canaries", "Owls", "Tasmanian Devils", "Bears", "Kangaroos", "Sea Serpents", "Other");

			naturalEnemies["Silly Species"].AddRange("Frogs", "Crows", "Storks", "Dinosaurs", "Elephants", "Hippos", "Mynah Birds", "Squirrels", "Pandas", "Penguins", "Giant Penguins", "Giant Were-Penguins", "Roadrunners", "Tortoises", "Walruses", "Deer", "Alligators", "Panthers");
			naturalEnemies["Silly Species"].AddRange("Grasshoppers", "Werewolves", "Ghosts", "Vampires", "Monkeies", "Bulls", "Foogle Birds", "Elves", "Gremlins", "Dwarves", "Hobbits", "Orcs", "Lizards", "Unicorns", "Fish", "Sharks", "Whales", "Octopi");

			m_NaturalEnemies = naturalEnemies.ToTableCollection();

			var occupations = new TableCollectionBuilder<string>();
			occupations["Occupations"].AddRange("Baby", "Child", "Student", "Policeman/Private Detective", "Fireman", "Mailman", "Milkman", "Shopkeeper", "Game Warden", "Astronaut", "Mad Scientist", "Criminal", "Hunter", "Farmer", "Doctor", "Lawyer", "Maid/Butler/Servant", "Sailor");
			occupations["Occupations"].AddRange("Spy", "Salesman", "Retired General", "Actor", "Singer/Muscian", "Artist", "Construction Worker", "Pirate", "Cowboy", "Indian", "Cook/French Chef", "Tailor", "Baseball Player", "Politician", "Clown", "Ringmaster", "Dogcatcher");
			m_Occupation = occupations.ToTableCollection();


			var normals = new List<string>();
			normals.AddRange("Lunch", "String", "Rope", "Gun", "Matches", "Ballons", "Squirting Flower", "Pictures of Family", "Bucket", "Pea Shooter w/Peas", "Pencil and Paper", "Marbles", "Chewing Gum", "Baling Wire", "Chocolate Chip Cookies", "Umbrella", "Whistle", "Rubber Bands", "Mirror", "Bottle of Perfume", "Lipstick", "Oil Can", "Bottle of Glue", "Newspaper", "Pocketknife");

			var unusuals = new List<string>();
			unusuals.AddRange("Butterfly Net", "Sledgehammer", "Roller Skates", "Banjo", "Bugle", "Two-headed Coin", "Accordian", "Computer", "President Regan Mask", "Dynamite", "Bear Trap", "Skateboard", "Telephone", "Ray Gun", "Boxing Gloves", "Eggbeater", "Alarm Clock", "Fish Bowl w/Piranha", "Itching Powder", "Magnifying Glass", "Anvil");

			m_Possessions = new TableCollection<PossessionDefinition>(
				new Table<PossessionDefinition>("Normal Stuff", 
					normals.Select(x => new PossessionDefinition(x, PossessionType.Normal))),
				new Table<PossessionDefinition>("Unusual Stuff",
					unusuals.Select(x => new PossessionDefinition(x, PossessionType.Unusual))),
				new Table<PossessionDefinition>("Gizmo", new PossessionDefinition("Gizmo", PossessionType.Gizmo, "Roll D6, target 3+")));



		}

		readonly TableCollection<string> m_NaturalEnemies;
		readonly ShitckDefinitionCollection m_Shitcks;
		readonly AttributeDefinitionCollection m_Attributes;
		readonly TableCollection<string> m_Species;
		readonly TableCollection<string> m_Occupation;
		readonly TableCollection<PossessionDefinition> m_Possessions;

		public override AttributeDefinitionCollection Attributes
		{
			get { return m_Attributes; }
		}
		public override ShitckDefinitionCollection Shitcks
		{
			get { return m_Shitcks; }
		}

		public override TableCollection<string> Species
		{
			get { return m_Species; }
		}

		public override TableCollection<string> Occupation
		{
			get { return m_Occupation; }
		}

		public override TableCollection<PossessionDefinition> Possessions
		{
			get { return m_Possessions; }
		}

		public override string Name
		{
			get { return "Deluxe Toon"; }
		}

		public override TableCollection<string> NaturalEnemies
		{
			get { return m_NaturalEnemies; }
		}
	}


}
